<template>
	<!--  -->
	<view class="wrap-mag">
		<view class="" :style="{ height: statusBarHeight + 'px' }">

		</view>

		<view class="wrap wbj">

			<view class="head">
				<text class="head-left">嘉会通</text>
				<text class="head-right">具体以申请产品为准</text>

			</view>


		</view>
		<view class="wrap">
			<view style="padding: 24rpx 0;">

				<view class="NoOne">
					<template v-if="list2">

						<recommendProducts2 @goInfo="goInfo" :list="list2"></recommendProducts2>
					</template>
					<view class="noTj" v-else>
						暂无推荐
					</view>

				</view>

				<view class="tit">
					<image src="@/static/bj/icon_sqsj.png" mode="heightFix"></image>
				</view>
				<recommendProducts @goInfo="goInfo" v-if="list.length!=0" :list="list"></recommendProducts>

				<noData v-else></noData>
			</view>
		</view>
	</view>


</template>

<script setup>
	import {
		getShopListv1
	} from '@/api/index.js'

	import recommendProducts from '@/components/list/com/components/list.vue'
	import recommendProducts2 from '@/components/list/com/components/list2.vue'
	import {
		ref,
		onMounted,
		getCurrentInstance
	} from 'vue'
	import {onShow}from'@dcloudio/uni-app'
	const {
		proxy
	} = getCurrentInstance();
	onShow(() => {
		init()
	})
	let statusBarHeight = proxy.$statusBarHeight();

	let pageData = ref({
		"pageSize": 20,
		"currentPage": 1
	})

	let listall = ref([])
	let list = ref([])
	let list2 = ref([])

	let init = async () => {
		let listall = await getShopListv1(pageData.value)
		list2.value = listall.data[0]
		list.value = listall.data.slice(1)
		// list.value=list.value.shift();
	};
	let goInfo = async (item) => {
		uni.navigateTo({
			url: '/pagesB/webview/webview?url='+item.h5url
		})
		return;
		proxy.$ymmdBtn("ymBtnPro", {
			name: '点击产品带id',
			id: item.id
		})
		let clickShopData = {
			shopId: item.id,
			type: item.openType
		}
	
		let ress = await clickShop(clickShopData)
		if (item.openType == 0) {
			goPage(item.h5url)
			// 连登
		} else if (item.openType == 1) {
			let data = {
				shopId: item.id,
				type: item.openType
			}
			let ll = await clickGood(data)
			if (ll.code == 100000) {
				let datass = {
					shopId: item.id
				}
				let p = await clickChannel(data)
	
			}
			// console.log(ll,'llllll')
			goPage(ll.data.h5url)
		}
		// console.log(item, '这是下面的列表数据')
	};
	
	let goPage = (url) => {
		uni.navigateTo({
			url
		})
	}
</script>
<style>
	page {
		background-image: url(https://oss.jht.jht.cash/img/20250609/2v7feG5Z.png);
		background-size: 100% 100%;

	}
</style>
<style lang="scss" scoped>

	.noTj {
		text-align: center;
		line-height: 320rpx;
		color: #fff;

	}

	.tit {
		margin: 36rpx 16rpx 18rpx 16rpx;
		height: 40rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}


	.NoOne {
		// padding: 20rpx;
		box-shadow: 0px 8px 8px 0px #B0D3FD;
		// height: 338rpx;
		background-image: url("../../static/bj/icon_list_bj.png");
		background-size: 100% 100%;
		border-radius: 30rpx;
	}

	.des {
		margin-top: 40rpx;
		text-align: center;
		color: #BFC3CF;
		font-family: FZLanTingYuan-L-GBK, FZLanTingYuan-L-GBK;
		font-weight: 400;

		.des-bot {
			font-size: 20rpx;
		}

		.des-top {
			font-size: 32rpx;
		}
	}

	.adimgwrap {
		margin-top: 24rpx;
		flex-wrap: wrap;
		justify-content: space-between;

		.adimg {
			width: 48.5%;
			// background: red;
			height: 180rpx;

			image {
				width: 100%;
				height: 100%;
			}

		}
	}

	.tit {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #333;
		margin-top: 20rpx;
	}

	.advantg {
		position: relative;

		.btn {
			position: absolute;
			width: 71%;
			height: 2.5rem;

			bottom: 10%;
			left: 14%;
		}

		width: 100%;
		height: 600rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.notice {
		margin: 40rpx 0 20rpx 0;
	}

	.head {
		display: flex;
		align-items: center;

		.head-right {
			color: #999;
			font-size: 24rpx;
			font-weight: 400;
			margin-left: 16rpx;
		}

		.head-left {
			color: #333;
			font-size: 32rpx;
			font-weight: 600;
		}
	}

	.wrap {
		padding: 0 30rpx;
	}

	.wrap-mag {
		// background: linear-gradient( 180deg, #D7EDFD 0%, #F9F9F9 100%);
		// height: 94vh;

	}
</style>